import { RouteObject, createBrowserRouter } from "react-router-dom";
import App from "../App";
import Index from "../views/index/Index";
import OrderIndex from "../views/order/OrderIndex";
import QueryIndex from "../views/query/QueryIndex";
import TicketIndex from "../views/ticket/TicketIndex";


const routes:RouteObject[] = [
    {
        path: '/',
        element: <App />,
        errorElement: <div>error</div>,
        children: [
            {
                path: 'index',
                element: <Index />
            },
            {
                path: 'order',
                element: <OrderIndex />
            },
            {
                path: 'query',
                element: <QueryIndex />
            },
            {
                path: 'ticket',
                element: <TicketIndex />
            }
        ]
    }
]

const router = createBrowserRouter(routes)

export default router